kmpkg_from_gitee(
    OUT_SOURCE_PATH SOURCE_PATH
    REPO kumo-pub/filesystem
    REF "v${VERSION}"
    HEAD_REF master
    SHA512 ef0258e46531c5354baf065fd9c1f70a41581aa14bc387c6c87c3c79dc5fc8306727cb6141c3972ca17cb3fbc509a3b396c230fd93b704b40d9b5db68684126a
)

set(KMPKG_BUILD_TYPE release) # header-only port

kmpkg_cmake_configure(
    SOURCE_PATH "${SOURCE_PATH}"
    OPTIONS
        -DKUMO_FILESYSTEM_BUILD_TESTING=OFF
        -DKUMO_FILESYSTEM_BUILD_EXAMPLES=OFF
        -DKUMO_FILESYSTEM_WITH_INSTALL=ON
)

kmpkg_cmake_install()
kmpkg_cmake_config_fixup(
    PACKAGE_NAME kumo_filesystem
    CONFIG_PATH "lib/cmake/kumo_filesystem"
)

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib")

file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
